﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleRest.Core.Routing;

namespace SimpleRest.Core
{
    /// <summary>
    /// Provides ability to map request details into a strongly typed object which can then be pumped into an input parameter for
    /// any associated service operation.
    /// </summary>
    public interface IOperationMappingHandler
    {
        /// <summary>
        /// The output parameter name (actual name) that the mapping should be tied to.
        /// </summary>
        string OutputParameterName { get; }
        /// <summary>
        /// Logic that performs mapping from request to object.
        /// </summary>
        /// <param name="request"></param>
        /// <param name="operation"></param>
        /// <returns></returns>
        object ExecuteMapping(IHttpRequestMessage request, Operation operation);
    }
}
